
var t ; //全局变量定时器

function start(){

    var d = new Date();

    var year = d.getFullYear();

    var month = d.getMonth()+1;

    var day = d.getDate();

    var hour = d.getHours();

    var minute = d.getMinutes();

    var second = d.getSeconds();

    var ts = year+"年"+month+"月"+day+"日 "+hour+":"+minute+":"+second;

    var tt = document.getElementById("tt");

    tt.value = ts;

//t 全局

    t = setTimeout("start()",1000);
    alert(t);

}

function stop(){

    window.clearTimeout(t);

}

